package es

import (
	"HumaTemplate/internal/configs"
	es7 "github.com/elastic/go-elasticsearch/v7"
)

var (
	ES *es7.Client
)

func Init(conf *configs.ElasticConfig) (err error) {
	ES, err = es7.NewClient(es7.Config{
		Addresses: conf.Addresses,
		Username:  conf.Username,
		Password:  conf.Password,
	})
	return
}
